$(document).ready(function(){
	//方案列表页去除右间距
	var num=$('.list-box').children().size();
    for(var i=1;i<=num;i++){
        if(i%3==0){
            $('.list-box').children().eq(i-1).css('margin-right',0);
        }
    };
})
function search(b_id){
		//按照一下条件查询
		var title=$("#title").val();
		var direction = $("#direction").val();
		var age_stage = $("#age_stage").val();
		var week = $("#week").val();
		//给radio默认的值
		//$("input[name=direction]:eq("+direction+")").attr("checked",'checked');
		
		
		//按条件查询
		window.location.href="/manager_scheme_show?title="+title+"&b_id="+b_id+"&direction="+direction+"&age_stage="+age_stage+"&week="+week;
	}
	

	//删除方案
	function del(id){
		if (confirm("您确定要删除吗？")){
			$.post('manager_message_delete',{id:id},function(data){
				if(data!="0"){
					alert("删除成功！");
					window.location.reload();
				}
			});
		}
	}
	
	
	//家长和教师方案高亮切换
		$(".head ul li").on("click",function(){
			$(this).addClass("light").siblings().removeClass("light");
		});
		
		
	//用于点击查询时下拉框中的查询条件不变
	$(function(){
		$('#age_stage').val($("#ages_stage").val());
		$('#direction').val($("#directions").val());
		$('#week').val($("#weekes").val());
	});
	
	
		//点击图片时对本方案进行预览
	  function look_message(id){
         $.post('manager_message_add',{id:id},function(){
        	 	window.location.href="/manager_message_findid?id="+id;
			});
	   };